#include<stdio.h>
#include<string.h>
int main()
{
  FILE* fp=fopen("bite.txt","w+");
  if(fp==NULL)
  {
    perror("fopen");
    return 1;
  }
  const char*msg="linux so easy!\n";
  char buffer[128];
  fwrite(msg,1,strlen(msg),fp);
  memset(buffer,0,sizeof(buffer));
  fseek(fp,0,SEEK_SET);
  int n=fread(buffer,1,sizeof(buffer),fp);
  if(n>0)
  {
    printf("%s",buffer);
  }
  fclose(fp);
  return 0;
}
